import gradio as gr

def greet(name, intensity):
    return "Hello, " + name + "!" * intensity

demo = gr.Interface(
    # 函数
    fn=greet,
    # text 控件
    # slider 控件
    inputs=["text", gr.Slider(value=2, minimum=1, maximum=10, step=1)],
    # Textbox 控件
    outputs=[gr.Textbox(label="greeting", lines=3)],
    # gr.Blocks
    # gr.HTML
    # gr.Tab
)

demo.launch()